package com.gxa.mapper.admin;

import com.gxa.common.R.ResponseData;
import com.gxa.pojo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.security.Principal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface AdminMapper {

    XiTong select_company();

    int update_company( @Param(value = "xiTongName") String xiTongName, @Param(value = "website")String website,
                        @Param(value = "qiYeName")String qiYeName, @Param(value = "qiYeAbstract")String qiYeAbstract,
                        @Param(value = "phone") String phone, @Param(value = "onOff")int onOff,
                        @Param(value = "timeout") int timeout, @Param(value = "wrongNum")int wrongNum);

    List<BackupLog> select_log();

    List<Menu> selectMenuByUserId(String id);

    void insert_log(@Param(value = "user") String user, @Param(value = "date")String date,
                    @Param(value = "size")String size, @Param(value = "handle")String handle);

    List<BianLiang> select_variable(@Param("keyWord") String keyWord,
                              @Param("pageSize")  int pageSize,
                              @Param("index") int index);

    int selectAllCount(@Param("keyWord") String keyWord);

    BianLiang into_update_variable(int id);

    void update_variable(@Param(value = "id") int id, @Param(value = "bianHao")int bianHao,
                            @Param(value = "message")String message, @Param(value = "title")String title,
                            @Param(value = "value")String value);

    List<Role> select_role(@Param("keyWord") String keyWord,
                        @Param("pageSize")  int pageSize,
                        @Param("index") int index);

    int selectAllRole(String keyWord);

    void add_role(@Param("rolename") String rolename,
                  @Param("note") String note);


    void add_roleMenu(@Param("i") int i,
                      @Param("newId") int newId);

    int findNewRoleId(String rolename);

    List<Role> select_update_role(int id);


    void deleteRoleMenu(int id);

    void update_role(@Param("id") int id,
                     @Param("rolename") String rolename,
                     @Param("note") String note);

    List<User> select_user(@Param("keyWord") String keyWord,
                           @Param("pageSize")  int pageSize,
                           @Param("index") int index);

    int selectAllUser(String keyWord);

    void add_user(@Param("number") String number,@Param("realname")  String realname,
                  @Param("newPassWord") String newPassWord,@Param("sex")  String sex,
                  @Param("rolename") String rolename,@Param("phone")  String phone,
                  @Param("email") String email);

    User into_update_user(int id);

    void update_user(@Param("id") int id,
                     @Param("number") String number,@Param("realname")  String realname,
                     @Param("newPassWord") String newPassWord,@Param("sex")  String sex,
                     @Param("rolename") String rolename,@Param("phone")  String phone,
                     @Param("email") String email);

    List<Role> roleNameList();

    List<Menu> allroleMenu();

    void updateHead(String s);

    int delete_role(int id);

    int delete_user(int id);

    List<Dept> bu_men();

    int fen_pei( @Param("number") String number,@Param("buMenName")  String buMenName);
}
